#!/bin/sh
#
#You should have fetched the datasets in GIM/src/staticdata/J2B2
#assuming LnMlib/src/mrpt folder
#

#Fetch data locally
cp ../../../staticdata/datasets/J2B2/08_02_11/KinectDataSet/J2B2.MaCI_Ranging.Laser_08_02_2011_17:56:51.txt .
cp ../../../staticdata/datasets/J2B2/08_02_11/KinectDataSet/J2B2.MaCI_Position.Motion_08_02_2011_17:56:51.txt .

#Convert to Rawlog
./MaCI2Rawlog J2B2.MaCI_Position.Motion_08_02_2011_17:56:51.txt J2B2.MaCI_Ranging.Laser_08_02_2011_17:56:51.txt

#Run RBPF SLAM
#rbpf-slam conf/RBPF.ini
#RUN ICP SLAM
icp-slam conf/icp-slam_demo.ini

#Save the result into MaCI logfile
#./OpenLogAddEstimateAndSave 0 J2B2.MaCI_Position.Motion_08_02_2011_17:56:51.txt J2B2.MaCI_Ranging.Laser_08_02_2011_17:56:51.txt LOG_RBPF/log_estimated_path.txt
./OpenLogAddEstimateAndSave 0 J2B2.MaCI_Position.Motion_08_02_2011_17:56:51.txt J2B2.MaCI_Ranging.Laser_08_02_2011_17:56:51.txt LOG_ICP-SLAM/log_estimated_path.txt

#And visualize output
../apps/plotters/avant600_plotter MaCI_dataset.txt J2B2.MaCI_Ranging.Laser_08_02_2011_17\:56\:51.txt
